<?php
/**
 * Created by PhpStorm.
 * User: 唐同广
 * Date: 2017/10/11
 * Time: 17:19
 */

namespace AppBundle\Service;

use Doctrine\DBAL\Connection;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

class CustomService extends BaseService {

    public function get(){
        $query = $this->em->createQuery('SELECT p FROM CourseBundle:User p');

        $users= $query->getResult();

        $this->getA();
        return $users;
    }

    private function getA(){
        //throw new NotFoundHttpException('not found');
    }
}